﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Data;
using KPIS.GERP.GHRMS.DAL;
using KPIS.GERP.GHRMS.MODEL;
using KPIS.GERP.GHRMS.IBLL;
using KPIS.GERP.GHRMS.IDAL;
using KPIS.GERP.GHRMS.DALFactory;

namespace KPIS.GERP.GHRMS.BLL
{
    public sealed class JobSiteCommandBLL : IJobSiteCommandBLL
    {
        private static readonly IJobSiteCommandDAL DAL = DataAccess.CreateJobSiteCommands();

        public DataTable SelectJobsiteCommandDtls(string job_site_seq)
        {
            return DAL.SelectJobsiteCommandDtls(job_site_seq);
        }

        public DataRow Select(string job_site_cmd_seq)
        {
            return DAL.Select(job_site_cmd_seq);
        }

        public void Insert(string cmd_draft_no, string cmd_ref_no
            , string cmd_descr, string cmd_status, string job_site_type, string approved_by
            , string approved_name, string approved_date, string approved_positions
            , string record_status, string created_by)
        {
            DAL.Insert(cmd_draft_no, cmd_ref_no
            , cmd_descr, cmd_status, job_site_type, approved_by
            , approved_name, approved_date, approved_positions
            , record_status, created_by);
        }

        public void Update(string job_site_cmd_seq, string cmd_draft_no, string cmd_ref_no
            , string cmd_descr, string cmd_status, string job_site_type, string approved_by
            , string approved_name, string approved_date, string approved_positions
            , string updated_by)
        {
            DAL.Update(job_site_cmd_seq, cmd_draft_no, cmd_ref_no
            , cmd_descr, cmd_status, job_site_type, approved_by
            , approved_name, approved_date, approved_positions
            , updated_by);
        }

        public void Delete(string job_site_cmd_seq, string updated_by)
        {
            DAL.Delete(job_site_cmd_seq, updated_by);
        }

        public void Approve(string job_site_cmd_seq, string approved_by, string approved_name
            , string approved_date, string approved_positions, string updated_by)
        {
            DAL.Approve(job_site_cmd_seq, approved_by, approved_name
            , approved_date, approved_positions, updated_by);
        }

        public void Cancel(string job_site_cmd_seq, string updated_by)
        {
            DAL.Cancel(job_site_cmd_seq, updated_by);
        }
    }
}
